package com.elric.mall.mapper;

import com.elric.mall.dto.ProgrammeManageDto;
import com.elric.mall.model.ProgrammeProject;
import com.elric.mall.model.ProgrammeProjectExample;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface ProgrammeProjectMapper {
    long countByExample(ProgrammeProjectExample example);

    int deleteByExample(ProgrammeProjectExample example);

    int deleteByPrimaryKey(String id);

    /**
     * 根据任务id删除对应的计划信息
     * @param id
     * @return
     */
    int deleteByTaskId(String id);

    int insert(ProgrammeProject record);

    int insertBatch(List<ProgrammeProject> records);

    int insertSelective(ProgrammeProject record);

    List<ProgrammeProject> selectByExampleWithBLOBs(ProgrammeProjectExample example);

    /**
     * 根据关联id查询计划项目信息
     * @param id
     * @return
     */
    List<ProgrammeManageDto> getProgrammeByRelId(String id);

    /**
     * 获取包含关联关系的计划项目清单
     * @return
     */
    List<ProgrammeManageDto> getLinkProgrammeList();

    List<ProgrammeProject> selectByExample(ProgrammeProjectExample example);

    List<ProgrammeManageDto> selectManageByModel(ProgrammeManageDto project);

    ProgrammeProject selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") ProgrammeProject record, @Param("example") ProgrammeProjectExample example);

    int updateByExampleWithBLOBs(@Param("record") ProgrammeProject record, @Param("example") ProgrammeProjectExample example);

    int updateByExample(@Param("record") ProgrammeProject record, @Param("example") ProgrammeProjectExample example);

    int updateByPrimaryKeySelective(ProgrammeProject record);

    int updateByPrimaryKeyWithBLOBs(ProgrammeProject record);

    int updateByPrimaryKey(ProgrammeProject record);
}